﻿<Window x:Class="FHIntranetParser.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:fhIntranetParser="clr-namespace:FHIntranetParser"
        Title="Completely useless tool" Height="480" Width="640">
    <Grid x:Name="ContentGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="111"/>
            <RowDefinition/>
            <RowDefinition Height="10"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Button Content="Go..." Margin="0,5,10,0" Click="Button_Click" Width="100" HorizontalAlignment="Right" Height="62" VerticalAlignment="Top"/>
        <StackPanel Margin="0">
            <StackPanel Orientation="Horizontal">
                <Label Content="History File:" Margin="5,0,0,0"/>
                <TextBox x:Name="HistoryFilePathTextBox" TextWrapping="Wrap" Text="C:\temp\FHHistory.xml" Margin="4,0,0,0" VerticalAlignment="Center" Width="317"/>
                <Button Content="..." Width="26" Margin="5,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Click="Button_Click_2"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Height="26">
                <Label Content="Config File:" Margin="5,0,0,0"/>
                <TextBox x:Name="ConfigFilePathTextBox" TextWrapping="Wrap" Text="C:\temp\FHConfig.xml" Margin="4,0,0,0" VerticalAlignment="Center" Width="319"/>
                <Button Content="..." Width="26" Margin="5,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Click="Button_Click_1"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Height="26">
                <Label Content="Interval:" Margin="5,0,0,0"/>
                <Slider x:Name="IntervalSlider" VerticalAlignment="Center" Width="200" Minimum="5" Maximum="60" SmallChange="1" Padding="0" Margin="5,0,0,0" IsSnapToTickEnabled="True" Value="5"/>
                <Label Content="{Binding Value, ElementName=IntervalSlider}"/>
                <Label Content="Minutes"/>
                <Label Content="Next check: "/>
                <TextBox x:Name="NextCheckTextBox" TextWrapping="Wrap" Width="63" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" IsReadOnly="True" Text="{Binding Timer, ElementName=GradesParser}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Height="26">
                <Label Content="Student:" Margin="5,0,0,0"/>
                <TextBox x:Name="StudentTextBox" TextWrapping="Wrap" Margin="3,0,0,0" VerticalAlignment="Center" Width="130" IsReadOnly="True"/>
                <Label Content="Matr. #: " Margin="5,0,0,0"/>
                <TextBox x:Name="MatrNumberTextBox" TextWrapping="Wrap" Margin="3,0,0,0" VerticalAlignment="Center" Width="80" IsReadOnly="True"/>
                <Label Content="Avg Grade:" Margin="5,0,0,0"/>
                <TextBox x:Name="AvgTextBox" TextWrapping="Wrap" Margin="3,0,0,0" VerticalAlignment="Center" Width="50" IsReadOnly="True"/>
                <Label Content="Total ECTS:" Margin="5,0,0,0"/>
                <TextBox x:Name="EctsTextBox" TextWrapping="Wrap" Margin="3,0,0,0" VerticalAlignment="Center" Width="50" IsReadOnly="True"/>
            </StackPanel>
        </StackPanel>
        <fhIntranetParser:GradesParser x:Name="GradesParser" Grid.Row="1" Reporting="GradesParser_Reporting"/>
        <GridSplitter HorizontalAlignment="Stretch" Grid.Row="2">
            <GridSplitter.Template>
                <ControlTemplate TargetType="{x:Type GridSplitter}">
                    <Grid>
                        <Button Content="····" VerticalAlignment="Top"  Padding="0,-5,0,0"/>
                        <Rectangle Fill="#00FFFFFF" />
                    </Grid>
                </ControlTemplate>
            </GridSplitter.Template>
        </GridSplitter>
        <Expander Header="Log" Grid.Row="3" IsExpanded="True" >
            <Grid Background="#FFE5E5E5">
                <TextBox x:Name="LogTextBox" TextWrapping="Wrap" IsReadOnly="True" AcceptsReturn="True" AcceptsTab="True" MinHeight="70" VerticalScrollBarVisibility="Auto" />
            </Grid>
        </Expander>

    </Grid>
</Window>
